package adc.app.spec;

import java.util.List;
import java.util.Map;

public interface IDao<T extends IBo> {

    <X extends T> X create(Class<X> boClass);

    <X extends T> void save(X bo);

    <X extends T> void delete(X bo);

    <X extends T> X byId(Class<X> boClass, Long id);

    <X extends T> List<X> list(Class<X> boClass, Map<String, Object> filter, Integer firstIndex,
            Integer maxResultCount, Map<String, Boolean> orderBy);

    <X extends T> Integer count(Class<X> boClass, Map<String, Object> filter);

}
